Introduction

Lyapunov's method is a:

  • Analisis tool of stability
  • Feedback design tool

Backstepping:

  • Recursive prodedure that interlaces the choice of a Lyapunov function with the design of feedback control
  • It breaks a the full design problem into a sequence of design problem of with lowe order
  • Used for solve stabilization, tracking and robust control

Sliding mode control:

  • Techinque for control under matching condition.
  • Idea: Trajectories are forced to reach a slding manifold in finite time, and stay on the manifold for all future time

Equilibrium poits:

Points in the state space where if you start there you stay there.

How to find the equilibrium points?

if

\begin{equation} \dot{x} = f(x) \end{equation}

find the values where $\dot{x} = 0$, (i.e. f(x) = 0)

  • Find the equilibrium points of a system is not a trivial thing, we can have multiply solutions.
  • The equilibrium points can be stable and non stable

In non linear systems we dont use the words: stability of the system, becuase is ambiguos (multiple stability points).

We use the words: Stability of an equilibrium.

Lyapunov theory

Lyapunov has introduced two stability methods:

  • The first method requires the availability of the system’s time response (time-dependent).
  • The second method (direct Lyapunov method) does not require the knowledge of the system’s time response.

Lyapunov direct method

Used to determinate asymptotically stability.

Lyapunov idea:

  • Basic concepts of phisics summarized by scalars
  • Disipation of energy

Lyapunov stability sense (L-stable)

Notations:

  • $x(0)$ is a starting state.
  • $|| . ||$ is the norm of a vector $x$, example: $||x|| = (x_1^2 + ,,, x_n^2)^{1/2}$

For explain the L-stability is common find a figure as:

  • $R$ and $r$ can be as smaller or big as we want.
  • These figures only descrive a idea of stability

Then L-stability is shown as:

The equilibrium point x0 is locally asymptotically stable if there exists r and R and are finite.

Global asymptotically stability: Starting anywhere we finished in a equilibrium point, $r = \infty$

Lyapunov function

  • A lyapunov functions $V(x)$ is a generalized notion of how the energy changes.

Escential facts

If $V(x)$ is a smooth function (continous with continuous derivatives), it is define the next concept of lyapunov stability:

  • Asymptotic stability: $V(x) > 0, \dot{V}(x) < 0$ for all $x \neq 0$
  • Critical stability: $V(x) > 0, \dot{V}(x) \leq 0$ for all $x \neq 0$
  • Unestable: $V(x) > 0, \dot{V}(x) > 0$ for all $x \neq 0$

where $\dot{V}(x)$ is a time-derivative of $V(x)$.

V(x) is a Lyapunov function if:

  • V(x) is smooth
  • V(0) = 0
  • V(x) = 0 for all $x \neq 0$
  • V(x) = $(\partial V(x)/\partial x) (dx/dt) \leq 0$ for all $x \neq 0$

If a Lyapunov function V(x) can be found for the state of a nonlinear or linear system $\dot{x} = f(x)$, where $f(0) = 0$, then the state $x = 0$ (equilibrium state) is asymptotically stable

There are no general algorithm to construct Lyapunov functions. But and idea is explained bellow.

Is V(x) a Lyapunov function for $\dot{x} = f(x)$?

  1. Obtain the equilibrium points (V(0)) of $\dot{x} = f(x)$, and for each equilibrium point do 2-5
  2. Define $V(x) > 0$ and V(0) = 0
  3. Obtain $\dot{V}(x)$
  4. Subtitute $\dot{x} = f(x)$ in $\dot{V}(x)$
  5. Check stability (where $\dot{V}(x)$ is $<0$)

A staring point to define a Lyapunov function can be of the next form:

$V(x) = \frac{\sum_{i = 1}^{n} {x_i ^2}}{2} $

V(0) represent a equilibrium point, its values can be diferent to 0

Example

Find a Lyapunov function V(x) for the next system, check stability:

$x = -x + x**3$


In [23]:
#Example step 1: Obtain values of V(0)

from sympy.abc import*
from sympy import *
from tools import*

t = Symbol('t')
x1 = Symbol('x_1')(t)

f = -x1 +x1**3 
V0 = find_roots(f,'x_1')
print "The equilibrium points are:"
V0


The equilibrium points are:
Out[23]:
$$\left [ -1, \quad 0, \quad 1\right ]$$

x = 1

For the equilibrium point $x = 1$ we define the next Lyapunov candidate:

$V(x) = \frac{(x-1)^2}{2}$

Why?

becuase $\frac{(x-1)^2}{2}$ is $>0$, we can see this in the its graph


In [8]:
%matplotlib inline
from numpy import*
import matplotlib.pyplot as plt
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(-3,3,.1)
y = (x-1)**2/2 
axes.plot(x,y)


Out[8]:
[<matplotlib.lines.Line2D at 0x109936350>]

But why $\frac{(x-1)^2}{2}$ is $>0$ intead of $\frac{x^2}{2}$ if the sugested rules say that a staring point to define a Lyapunov function can be of the next form:

$V(x) = \frac{\sum_{i = 1}^{n} {x_i ^2}}{2} $

beacuse with $\frac{(x-1)^2}{2} \Longrightarrow V(0) = 0$. Remember that $V(0)$ is the evaluation of $V(x)$ in the equilibrium point, in this case $x =1$

The derivative of $V(x)$ is: $\dot{V}(x) = (x-1) \dot{x}$


In [12]:
#Example step 2: obtain time derivative of V(x)
from tools import*
var = ['x']
x, = def_vars(var,True)

V = (x-1)**2/2
Vd = diff(V,t)
Vd


Out[12]:
$$\left(x{\left (t \right )} - 1\right) \frac{d}{d t} x{\left (t \right )}$$

We need to subtitute $\dot{x} = f(x)$ in $\dot{V}(x)$, we have


In [24]:
x, = def_vars(var,False)
sub = simplify((x-1)*(-x +x**3))
sub


Out[24]:
$$x \left(x - 1\right) \left(x^{2} - 1\right)$$

In [40]:
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(0,2,.1)
y = (x-1)*(-x +x**3) 
plt.ylim(-1, 2)
plt.grid(True)
axes.plot(x,y)


Out[40]:
[<matplotlib.lines.Line2D at 0x10cae9310>]

$\dot{V}(x)$ is positive defined $>0$ in the locallity of $x=1$, then the equilibrium is unstable

x = 0

The candidate is $\frac{x^2}{2}$, $V(0) = 0$, $\dot{V(}x) = x (-x + x**3) $


In [43]:
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(-1.5,1.5,.1)
y = (x)*(-x +x**3) 
plt.ylim(-1, 3)
plt.grid(True)
axes.plot(x,y)


Out[43]:
[<matplotlib.lines.Line2D at 0x10cc21e50>]

$\dot{V}(x)$ is negative semidefined $\leq 0$ in the locallity of $x=0$, then the equilibrium is locally stable

Simillarlly is done with the last equilibrium point

More examples:


In [ ]: